<template>
    <div>
        <el-button @click="addBtn">新增</el-button>
        <!-- 使用弹框-->
         <FwDialog
            :title="dialog.title"
            :visible="dialog.visible"
            :width="dialog.width"
            @on-close="handleClose"
            @on-confirm="handleConfirm"
         >
         <!-- 弹窗内容-->
            <template v-slot:content>
                <div>张三、李四</div>
            </template>
         </FwDialog>
    </div>
</template>

<script setup lang="ts">
import FwDialog from '@/components/dialog/FwDialog.vue'
import { dialog,fwDialogClose,fwDialogOpen } from '@/components/dialog/FwDialog.ts'

// 显示弹框 
const addBtn = ()=>{
    dialog.title = '新增'
    fwDialogOpen()
}

const handleClose = ()=>{
    fwDialogClose()
}
const handleConfirm = ()=>{
    alert('确定删除吗？')
    fwDialogClose()
}
</script>

<style scoped>

</style>